package com.yourgroup.common.exception;

/**
 * 29548
 * IntelliJ IDEA
 * 12:38
 * 星期二
 */
public enum ErrorCode {
    SUCCESS(200, "成功"),
    PARAM_ERROR(400, "参数错误"),
    SYSTEM_ERROR(500, "系统异常"),
    PHONE_INVALID(1001, "手机号格式错误"),
    ID_CARD_INVALID(1002, "身份证号无效"),
    EMAIL_INVALID(1003, "邮箱格式错误");

    private final int code;
    private final String msg;

    ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    // getter方法
    public int getCode() { return code; }
    public String getMsg() { return msg; }
}
